<template>
    <div>
        喜欢的文章

        <div class="acticle">
  <ul class="list-unstyled">
    <b-media tag="li" class="my-4" @click="goDetail(item.id)" v-for="item in likeArticleList" :key="item.id">
      <template v-slot:aside>
          <img src="../../assets/logo.png" alt="Media Aside" width="64">
        <!-- <b-img blank blank-color="#abc" width="64" alt="placeholder" ></b-img> -->
      </template>
      <h5 class="mt-0 mb-1">{{item.title}}</h5>
      <p class="mb-0">
          {{item.zhaiyao}}
          <span class="timeAndclick">
        <span>发表时间：{{item.add_time}}</span>
        <span>点击：{{item.click}}次</span>
          </span>
      </p>
    </b-media>
  </ul>
        </div>
    </div>
</template>
<script>
export default {
  data() {
    return {
      likeArticleList:[
        {id:1,title:'bbb',zhaiyao:'bbbb',add_time:'12.12.12',click:'12',imgUrl:''},
        {id:2,title:'bbb',zhaiyao:'bbbb',add_time:'12.12.12',click:'12',imgUrl:''},
      ]
    }
  },
  methods:{
    getlikeArticleList(){
      this.$http.get("/client/client_detail/"+this.$store.state.userid+'/favour/1/5').then(res=>{
        var arrsum=[]
        for(var i =0;i<res.max_wen;i++){
          arrsum.push({id:res.data.no[i],name:res.data.name[i],zhaiyao:res.data.zhaiyao[i],add_time:res.data.time[i],click:res.data.count[i]})
        }
        this.likeActicleList = arrsum
      })
    },
    goDetail(param){
      this.$router.push('/newsinfo/' + param)
    }
  },
  created(){
    this.getlikeArticleList()
  }
}
</script>
<style scoped>
.my-4:hover{
    background-color: #eff;
}
.timeAndclick{
    display: flex;
    justify-content: space-between;
    font-size:13px;
    color: blue;
}
</style>